<template>
  <div class="app_box">
    <Header v-show="headerStatus" /><MainNav v-show="navStatus" />
    <div class="sub-container">
      <Loading v-show="loading" />
      <div v-show="!loading" id="micro-container">子应用内容</div>
    </div>
    <Footer />
  </div>
</template>

<script>
// import { ref } from "vue";
import Header from "./components/Header.vue";
import MainNav from "./components/MainNav.vue";
import Loading from "./components/Loading.vue";
import Footer from "./components/Footer.vue";
import { loading, header, nav } from "./store/index.js";

export default {
  name: "App",
  components: {
    Header,
    MainNav,
    Loading,
    Footer,
  },
  setup() {
    /* const loading = ref(true);
    setTimeout(() => {
      loading.value = false;
    }, 3000); */

    return {
      loading: loading.loadingStatus,
      headerStatus: header.headerStatus,
      navStatus: nav.navStatus
    };
  },
};
</script>

<style>
html,
body,
#micro_web_main_app,
.app_box {
  width: 100%;
  height: 100%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.sub-container {
  min-height: 100%;
  position: relative;
}
#micro-container {
  min-height: 100%;
  width: 100%;
}
</style>
